import {ErrorHandler, NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {IonicApp, IonicErrorHandler, IonicModule} from 'ionic-angular';
import {MyApp} from './app.component';
import {ProvidersModule} from "@providers/providers.module";
import {HttpClientModule} from "@angular/common/http";
import {CallNumber} from "@ionic-native/call-number";
import {CalendarModule} from "ion2-calendar";
import {AppUpdate} from "@ionic-native/app-update";
import {CodePush} from "@ionic-native/code-push";
import {AppVersion} from "@ionic-native/app-version";
import {SplashScreen} from "@ionic-native/splash-screen";
import {StatusBar} from "@ionic-native/status-bar";
import {File} from "@ionic-native/file";
import {BarcodeScanner} from "@ionic-native/barcode-scanner";
import {ImagePicker} from "@ionic-native/image-picker";
import {Camera} from "@ionic-native/camera";
import {PhotoViewer} from "@ionic-native/photo-viewer";
import {Diagnostic} from "@ionic-native/diagnostic";
import {ComponentsModule} from "@components/components.module";
import {Device} from "@ionic-native/device";
import {JPush} from "@jiguang-ionic/jpush";

@NgModule({
  declarations: [
    MyApp
  ],
  imports: [
    BrowserModule,
    CalendarModule,
    IonicModule.forRoot(MyApp, {
      preloadModules: true,
      mode: 'md',
      backButtonIcon: 'ios-arrow-back'
    }),
    HttpClientModule,
    ProvidersModule,
    ComponentsModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    CallNumber,
    AppUpdate,
    CodePush,
    AppVersion,
    File,
    BarcodeScanner,
    Camera,
    ImagePicker,
    PhotoViewer,
    Diagnostic,
    Device,
    JPush
  ]
})
export class AppModule {
}
